#pragma once

#define SIZE 2048
#define FFLUSH_NONE 1
#define FFLUSH_LINE (1<<1)
#define FFLUSH_ALL (1<<2)



typedef struct _myfile{
    int fileno;
    char buffer[SIZE];
    int end;
    int flag;
}myfile;


extern myfile* my_fopen(const char* path,const char* mode);
extern int my_fwrite(const char* ptr,int size,myfile* stream);
extern int my_fflush(myfile* stream);
extern int my_fclose(myfile* stream);
